//
//  AppDelegate+Theme.m
//  XJL_WeChat
//
//  Created by XJL on 16/8/1.
//  Copyright © 2016年 Xujiali. All rights reserved.
//

#import "AppDelegate+Theme.h"

@implementation AppDelegate (Theme)

-(void)setupTheme{
    //设置tabbar按钮文字选中的颜色
    [UITabBar appearance].tintColor = [UIColor colorWithRed:26/255.0 green:178/255.0 blue:10/255.0 alpha:1];
    
    //设置导航栏的背景
    [[UINavigationBar appearance] setBackgroundImage:[UIImage imageNamed:@"nav_64"] forBarMetrics:UIBarMetricsDefault];
    
    //设置导航栏的标题的文字颜色
    [[UINavigationBar appearance] setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor whiteColor]}];
    
    // 设置状态的样式
    /**
     * 1.默认情况下,状态的样式是由控制器
     * 2.[UIApplication sharedApplication].statusBarStyle 如果使用UIApplication来设置状态的样式,需要在Info.plist添加一个配置,View controller-based status bar appearance = NO
     */
    [UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleLightContent;
    
    // 设置导航栏item的样式
    [UINavigationBar appearance].tintColor = [UIColor whiteColor];
}
@end
